package br.net.atasacramental.menu.model;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="MENU")
public class Menu{
	
	@Id 
	@GenericGenerator(name="seq_menu" , strategy="increment")
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="seq_menu")
	@Column(name="ID_MENU")
	private int idMenu;
	@Column(name="LABEL")
	private String label;
	@Column(name="ORDEM")
	private int ordem;
	@Column(name="ICONE")
	private String icone;	
	@Transient
	private List<ItemMenu> children;
	public Menu(){
		super();
	}
	public int getIdMenu(){
		return this.idMenu;
	}
	public void setIdMenu(int idMenu){
		this.idMenu = idMenu;
	}	
	public String getLabel(){
		return this.label;
	}
	public void setLabel(String label){
		this.label = label;
	}	
	public int getOrdem(){
		return this.ordem;
	}
	public void setOrdem(int ordem){
		this.ordem = ordem;
	}
	public List<ItemMenu> getChildren() {
		return children;
	}
	public void setChildren(List<ItemMenu> children) {
		this.children = children;
	}
	public String getIcone() {
		return icone;
	}
	public void setIcone(String icone) {
		this.icone = icone;
	}
}
